package utils

import "strings"

const (
	HeaderKeyContentType          = "Content-Type"
	ContentTypeJson               = "application/json"
	ContentTypePlainText          = "text/plain"
	ContentTypePlainTextUTF8      = "text/plain; charset=utf-8"
	ContentTypeXWWWFormUrlencoded = "application/x-www-form-urlencoded"
)

func IsHttpUrl(s string) bool {
	if len(s) < 10 {
		return false
	}

	s = strings.ToLower(s[:8])
	if strings.HasPrefix(s, "http://") || strings.HasPrefix(s, "https://") {
		return true
	}
	return false
}
